package pl.auto.ws;

import java.sql.PseudoColumnUsage;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.logging.Logger;

public class EwusService implements IEwusService {

	private final static Logger LOGGER = Logger.getLogger(Generator.class .getName()); 
	
	@Override
	public Map<String, String> checkPesels(List<String> pesels) {
		Map<String, String> peselsResult = new HashMap<String, String>();
		LOGGER.info("Logowanie do ewusia");
		Generator generator = new Generator();
		String login = generator.prepareLoginSoap("Stefan", "qwert612asd");
		LOGGER.info(login);
		LOGGER.info("Sprawdzanie peseli");
		for (String string : pesels) {
			String check = generator.prepareCheckSoap(string);
			LOGGER.info(check);
			String result = generator.executeCheck(string);
			LOGGER.info("osoba o numerze pesel: " + string + " " + result);
			peselsResult.put(string, result);
		}
		
		return peselsResult;
	}

}
